package com.maila.xiaoaobusiness.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.maila.xiaoaobusiness.R;
import com.maila.xiaoaobusiness.activity.ManageGoodsActivity;
import com.maila.xiaoaobusiness.activity.MyWalletActivity;
import com.maila.xiaoaobusiness.activity.OrderManageActivity;
import com.maila.xiaoaobusiness.activity.PromotionActivity;
import com.maila.xiaoaobusiness.activity.TradeRecodeActivity;
import com.maila.xiaoaobusiness.utils.StartActivityUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * 运营页面
 * Created by mark on 2017/11/20.
 */

public class BusinessFragment extends Fragment {
    @BindView(R.id.tv_order_num)
    TextView tvOrderNum;
    @BindView(R.id.tv_today_earn)
    TextView tvTodayEarn;
    Unbinder unbinder;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View footview = inflater.inflate(R.layout.fragment_business, container, false);
        unbinder = ButterKnife.bind(this, footview);
        return footview;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.ll_money_detail, R.id.all_order_manage, R.id.all_sale, R.id.all_goods_manage})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_money_detail:
                StartActivityUtils.start(getActivity(), MyWalletActivity.class);
                break;
            case R.id.all_order_manage:
                StartActivityUtils.start(getActivity(), OrderManageActivity.class);
                break;
            case R.id.all_sale:
                StartActivityUtils.start(getActivity(), PromotionActivity.class);
                break;
            case R.id.all_goods_manage:
                StartActivityUtils.start(getActivity(), ManageGoodsActivity.class);
                break;
        }
    }
}
